package com.linghui.videoplus.ipai.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.webkit.DownloadListener;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.linghui.videoplus.ipai.R;

public class SinaWebViewActivity extends BrowserActivity {

	private WebView mWebView;
	private Intent intent = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_sina_browser);
		mWebView = (WebView) findViewById(R.id.sinaWebView);
		WebSettings webSettings = mWebView.getSettings();
		webSettings.setJavaScriptEnabled(true);
		Bundle data = this.getIntent().getExtras();
		mWebView.loadUrl(data.getString("url"));
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK) {
			this.setResult(RESULT_OK, getIntent());
			this.finish();
		}
		return super.onKeyDown(keyCode, event);
	}
}
